package com.ddtech.framework.log.service;

import com.ddtech.framework.log.service.dto.LoginLogQueryCriteria;
import com.ddtech.framework.security.security.JwtUser;
import com.ddtech.framework.security.security.OnlineUser;
import org.springframework.data.domain.Pageable;
import org.springframework.scheduling.annotation.Async;

/**
 * <p>
 * <p>
 * </p>
 *
 * @author bin_pu
 * @since 2020/5/9 10:34
 */
public interface LoginLogService {
    @Async
    void create(JwtUser jwtUser, OnlineUser onlineUser);

    @Async
    void upLogoutTime(String token);

    @Async
    void upToken(String oldToken, String newToken);

    Object queryAll(LoginLogQueryCriteria criteria, Pageable pageable);

    int deleteByUserId(String userId);

    int deleteByDeptId(String deptId);

}
